package com.wu.framework.upms.rpc;

import com.wu.framework.upms.api.UpmsApi;
import com.wu.framework.upms.domain.entity.UcUser;
import com.wu.framework.upms.persistence.jpa.UcUserJpaRepository;
import com.wu.framework.inner.layer.web.EasyController;

/**
 * description
 *
 * @author 吴佳伟
 * @date 2021/5/25 5:11 下午
 */
@EasyController()
public class UpmsRpc implements UpmsApi {

    private final UcUserJpaRepository ucUserJpaRepository;

    public UpmsRpc(UcUserJpaRepository ucUserJpaRepository) {
        this.ucUserJpaRepository = ucUserJpaRepository;
    }


    /**
     * description 根据租户ID 用户名查询用户信息
     *
     * @param tenantId
     * @param userName
     * @return
     * @exception/throws
     * @author 吴佳伟
     * @date 2021/5/26 3:41 下午
     */
    @Override
    public UcUser getUcUserByTenantIdAndUserName(String tenantId, String userName) {
        return ucUserJpaRepository.getUcUserByTenantIdAndUserName(tenantId, userName);
    }
}
